//
//  Game.m
//  OC1_类和对象课后作业
//
//  Created by dllo on 15/10/22.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "Game.h"

@implementation Game

-(id)init
{

    _name = @"LOL";
    _size = 4.15;
    [self info];
    return self;

}

-(void)info
{

    NSLog(@"%@ %f", _name, _size);

}

-(void)play
{

    NSLog(@"你拿个%.2fG的U盘来装%@", _size, _name);

}


-(NSString *)name;
{
    return _name;
}

-(void)setName:(NSString *)name;
{
    _name = name;
}
-(CGFloat)size;
{
    return _size;
}
-(void)setSize:(CGFloat)size;
{
    _size = size;
}
-(id)initWithName:(NSString *)name size:(CGFloat)size;
{
    _name = name;
    _size = size;
    return self;
}

+ (id)gameWithName:(NSString *)name size:(CGFloat)size
{
    Game *g = [[Game alloc] initWithName:name size:size];
    return g;
}







@end
